<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03angular指令</title>
</head>
<body>
    <div ng-app="app">
        <ul ng-controller="demoController">
            <li ng-bind="name"></li>
            <li>{{name}}</li>
            <li ng-show="isShow">控制是显示还是隐藏</li>
            <li ng-hide="isHide">控制是隐藏还是显示</li>
            <li ng-if="isTrue">控制元素是否存在，为true时存在</li>
            <li>
                <input type="text" value="表单禁用" ng-disabled="isDisabled">
            </li>
            <li>
                <input type="text" value="只读" ng-readonly="false">
            </li>
            <li>
                <input type="checkbox" ng-checked="true">选中
            </li>
            <li>
                <select name="" id="">
                    <option value="">男</option>
                    <option value="" ng-selected="true">女</option>
                </select>
            </li>
        </ul>
    </div>
    <script src="libs/angular.min.js"></script>
<script>
    //定义模块
    var app = angular.module("app",[]);
    //定义控制器
    app.controller("demoController",["$scope",function($scope){
        $scope.name="张三";
        $scope.isShow = true;  //隐藏类似于display:none，审查元素还能看到
        $scope.isHide = true; //隐藏类似于display:none，审查元素还能看到
        $scope.isTrue = false;   //审查元素时看不到了
        $scope.isDisabled = true; //为true时禁用
    }]);
</script>
</body>
</html>